
import { HTTP } from '../utils/request';
const http = new HTTP();

// 获取项目列表
export function queryProjectList(state,page,){
  return http.request({
    url: '/v1/applet/project/page/list',
    method: 'get',
    data: {
      'state': state,
      'pageIndex': page,
      'pageSize': 10,
    }
  })
}

// 获取项目详情信息
export function queryProjectDetail(projectId){
  return http.request({
    url: '/v1/applet/project/detail/' + projectId,
    method: 'get',
    data: {
    }
  })
}

// 领取项目
export function receiveProject(projectId){
  return http.request({
    url: '/v1/applet/project/receive/' + projectId,
    method: 'post',
    data: {}
  })
}

// 获取项目签约链接
export function signProject(projectId){
  return http.request({
    url: '/v1/applet/project/sign/' + projectId,
    method: 'post',
    data: {}
  })
}

// 获取项目佣金
export function queryUserSettlementGather(startTime = '',endTime = '',page = 1){
  return http.request({
    url: '/v1/applet/settlement/gather',
    method: 'get',
    data: {
      'startTime': startTime, // 开始时间
      'endTime': endTime, // 结束时间
      'pageIndex': page,
      'pageSize': 10,
    }
  })
}